﻿using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
using System.Windows.Input;
using System.Windows.Controls;
using ReflectionStudio.Core.Events;
namespace WPFExcelReport
{
    public partial class TABFQCBX:UIABFQC
    {

        public TABFQCBX()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VABFOLGE();
            this.DataContext = MV;
            //MESSAGES += "QCRELOAD;REFRESHBYGB33;";
            InitializeComponent();
            IsQC = true;
        } 
      
        public override void QueryCommand(object sender, RoutedEventArgs e)
        {
            try
            {
                base.QueryCommand(sender, e);
                btnED.IsEnabled = true;
                btnNEW.IsEnabled = true;
                btnDEL.IsEnabled = true;
             }
            catch (Exception ex)
            {
                Tracer.Error(ex.StackTrace, ex);
            }
        }
     
        public override void EditCommand(object sender, RoutedEventArgs e)
        {
           
             base.EditCommand(sender, e);
            btnNEW.IsEnabled = false;
            btnED.IsEnabled = false; 
            btnQU.IsEnabled = false;
            btnDEL.IsEnabled = false;
            
        }
        public override void SaveCommand(object sender, RoutedEventArgs e)
        {        
          
            base.SaveCommand(sender, e);
            btnNEW.IsEnabled = true;
            btnED.IsEnabled = true;
            btnQU.IsEnabled = true;
            btnDEL.IsEnabled = true;
        } 
      
    }
}
